<?php
/**
 * Pagination - Show numbered pagination for catalog pages.
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     2.0.0
 */

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

global $wp_query;
?>

<?php if ( $wp_query->max_num_pages > 1 ) : ?>

	<div class="clearboth"></div>

	<?php if(is_plugin_active('wp-pagenavi/wp-pagenavi.php')) {
		wp_pagenavi();
	} else { ?>
		
	<div class="pagination-wrapper">
		<p class="clearfix">
			<span class="fl"><?php previous_posts_link( __( '<span class="meta-nav">&larr;</span> Previous', 'woocommerce' ) ); ?></span>
			<span class="fr"><?php next_posts_link( __( 'Next <span class="meta-nav">&rarr;</span>', 'woocommerce' ) ); ?></span>
		</p>
	</div>
		
	<?php } ?>

<?php endif; ?>